package main

/*
解析命令行参数
 */

import (
	"flag"
	"fmt"
)

var testFlag = flag.String("test", "default", "help msg")

func print(f *flag.Flag){
	if f != nil {
		fmt.Println(f.Value)
	}else{

		fmt.Println(nil)
	}
}



func main() {
	fmt.Println("test:")
	print(flag.Lookup("test"))

	flag.Parse()
	fmt.Println("test")
	print(flag.Lookup("test"))



}